<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加就诊记录</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/css/simplemde.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/mainstyle.css">
</head>
<style>
    .col-form-label {
        font-size: 20px;
        font-family: Arial, sans-serif;
    }
    .form-group{
        margin-bottom: 10px;
    }
</style>
<body>
<div th:insert="~{doctor/header}"></div>
<main id="main">
    <!--副标题-->
    <section class="breadcrumbs">
        <div class="container">
            <div class="d-flex justify-content-between align-items-center">
                <h2>我的挂号</h2>
                <ol>
                    <li><a href="#">首页</a></li>
                    <li><a href="#">我的挂号</a></li>
                </ol>
            </div>
        </div>
    </section>
    <section class="inner-page">
        <div class="container ">
            <div class="card ">
                <div class="card-body">
                    <h1 class="card-title">添加就诊记录</h1>
                    <a th:href="@{/doctor/selectMzgh}" class="btn btn1 btn-sm float-right" style="color:#409eff;background: #ecf5ff;border: 1px solid #b3d8ff;">返回</a>
                        <form th:action="@{/doctor/addARecord}" method="post" class="form mx-auto">
                            <div class="form-group row">
                                <input type="hidden" name="mId" th:value="${mId}"/>
                            </div>
                            <div class="form-group row text-center align-items-center">
                                <label for="name" class="col-2 col-form-label text-center">患者姓名:</label>
                                <div class="col-4">
                                    <input class="form-control" id="name" name="name" th:value="${name}" readonly/>
                                </div>
                                <label for="cno" class="col-2 col-form-label text-center">身份证号:</label>
                                <div class="col-4">
                                    <input class="form-control" id="cno" name="cno" th:value="${cno}" readonly/>
                                </div>
                            </div>
                            <div class="form-group row text-center align-items-center">
                                <label for="dname" class="col-2 col-form-label text-center">医&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生:</label>
                                <div class="col-4">
                                    <input class="form-control" id="dname" name="dname" th:value="${dname}" readonly/>
                                </div>
                                <label for="zdrq" class="col-2 col-form-label text-center">就诊日期:</label>
                                <div class="col-4">
                                    <input class="form-control" id="zdrq" name="zdrq" th:value="${#temporals.format(zdrq, 'yyyy-MM-dd HH:mm:ss')}" readonly/>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label for="caseDetails" class="col-2 col-form-label text-center align-items-center">医嘱病例:</label>
                                <div class="col-10">
                                    <textarea class="form-control" id="caseDetails" name="detail" rows="8"></textarea>
                                </div>
                            </div>
                            <div class="form-group text-center align-items-center">
                                <button type="submit" class="btn" style="color: #0accce;background: #e5fcfb;border-color: #ace2dd;">保存记录</button>
                            </div>
                        </form>
                </div>
            </div>
        </div>
    </section>
</main>
<script src="/js/simplemde.min.js"></script>
<script>
    // 在页面加载后初始化 SimpleMDE 编辑器
    document.addEventListener("DOMContentLoaded", function() {
        var simplemde = new SimpleMDE({
            element: document.getElementById("caseDetails"),
            autosave: {
                enabled: true,
                uniqueId: "caseDetails",
                delay: 1000,
            },
            initialValue:'',
            placeholder: "请输入病例详情...",
        });
    });
</script>
</body>
</html>